\(\int \log (c (a+b x^2)^p) \, dx\) [5]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 45 \[ \int \log \left (c \left (a+b x^2\right )^p\right ) \, dx=-2 p x+\frac {2 \sqrt {a} p \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b}}+x \log \left (c \left (a+b x^2\right )^p\right ) \]

[Out]

-2*p*x+x*ln(c*(b*x^2+a)^p)+2*p*arctan(x*b^(1/2)/a^(1/2))*a^(1/2)/b^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2498, 327, 211} \[ \int \log \left (c \left (a+b x^2\right )^p\right ) \, dx=\frac {2 \sqrt {a} p \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b}}+x \log \left (c \left (a+b x^2\right )^p\right )-2 p x \]

[In]

Int[Log[c*(a + b*x^2)^p],x]

[Out]

-2*p*x + (2*Sqrt[a]*p*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/Sqrt[b] + x*Log[c*(a + b*x^2)^p]

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2498

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)], x_Symbol] :> Simp[x*Log[c*(d + e*x^n)^p], x] - Dist[e*n*p, Int[
x^n/(d + e*x^n), x], x] /; FreeQ[{c, d, e, n, p}, x]

Rubi steps \begin{align*} \text {integral}& = x \log \left (c \left (a+b x^2\right )^p\right )-(2 b p) \int \frac {x^2}{a+b x^2} \, dx \\ & = -2 p x+x \log \left (c \left (a+b x^2\right )^p\right )+(2 a p) \int \frac {1}{a+b x^2} \, dx \\ & = -2 p x+\frac {2 \sqrt {a} p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b}}+x \log \left (c \left (a+b x^2\right )^p\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.00 \[ \int \log \left (c \left (a+b x^2\right )^p\right ) \, dx=-2 p x+\frac {2 \sqrt {a} p \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b}}+x \log \left (c \left (a+b x^2\right )^p\right ) \]

[In]

Integrate[Log[c*(a + b*x^2)^p],x]

[Out]

-2*p*x + (2*Sqrt[a]*p*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/Sqrt[b] + x*Log[c*(a + b*x^2)^p]

Maple [A] (verified)

Time = 0.28 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.02

method result size
default \(x \ln \left (c \left (b \,x^{2}+a \right )^{p}\right )-2 p b \left (\frac {x}{b}-\frac {a \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{b \sqrt {a b}}\right )\) \(46\)
parts \(x \ln \left (c \left (b \,x^{2}+a \right )^{p}\right )-2 p b \left (\frac {x}{b}-\frac {a \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{b \sqrt {a b}}\right )\) \(46\)
risch \(x \ln \left (\left (b \,x^{2}+a \right )^{p}\right )+\frac {i {\operatorname {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )}^{2} \operatorname {csgn}\left (i \left (b \,x^{2}+a \right )^{p}\right ) x \pi }{2}-\frac {i \pi x \,\operatorname {csgn}\left (i \left (b \,x^{2}+a \right )^{p}\right ) \operatorname {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right ) \operatorname {csgn}\left (i c \right )}{2}-\frac {i \pi x {\operatorname {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )}^{3}}{2}+\frac {i \operatorname {csgn}\left (i c \right ) {\operatorname {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )}^{2} x \pi }{2}+x \ln \left (c \right )+\frac {\sqrt {-a b}\, p \ln \left (-\sqrt {-a b}\, x +a \right )}{b}-\frac {\sqrt {-a b}\, p \ln \left (\sqrt {-a b}\, x +a \right )}{b}-2 p x\) \(186\)

[In]

int(ln(c*(b*x^2+a)^p),x,method=_RETURNVERBOSE)

[Out]

x*ln(c*(b*x^2+a)^p)-2*p*b*(x/b-a/b/(a*b)^(1/2)*arctan(b*x/(a*b)^(1/2)))

Fricas [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 107, normalized size of antiderivative = 2.38 \[ \int \log \left (c \left (a+b x^2\right )^p\right ) \, dx=\left [p x \log \left (b x^{2} + a\right ) + p \sqrt {-\frac {a}{b}} \log \left (\frac {b x^{2} + 2 \, b x \sqrt {-\frac {a}{b}} - a}{b x^{2} + a}\right ) - 2 \, p x + x \log \left (c\right ), p x \log \left (b x^{2} + a\right ) + 2 \, p \sqrt {\frac {a}{b}} \arctan \left (\frac {b x \sqrt {\frac {a}{b}}}{a}\right ) - 2 \, p x + x \log \left (c\right )\right ] \]

[In]

integrate(log(c*(b*x^2+a)^p),x, algorithm="fricas")

[Out]

[p*x*log(b*x^2 + a) + p*sqrt(-a/b)*log((b*x^2 + 2*b*x*sqrt(-a/b) - a)/(b*x^2 + a)) - 2*p*x + x*log(c), p*x*log
(b*x^2 + a) + 2*p*sqrt(a/b)*arctan(b*x*sqrt(a/b)/a) - 2*p*x + x*log(c)]

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 100 vs. \(2 (44) = 88\).

Time = 2.01 (sec) , antiderivative size = 100, normalized size of antiderivative = 2.22 \[ \int \log \left (c \left (a+b x^2\right )^p\right ) \, dx=\begin {cases} x \log {\left (0^{p} c \right )} & \text {for}\: a = 0 \wedge b = 0 \\x \log {\left (a^{p} c \right )} & \text {for}\: b = 0 \\- 2 p x + x \log {\left (c \left (b x^{2}\right )^{p} \right )} & \text {for}\: a = 0 \\\frac {2 a p \log {\left (x - \sqrt {- \frac {a}{b}} \right )}}{b \sqrt {- \frac {a}{b}}} - \frac {a \log {\left (c \left (a + b x^{2}\right )^{p} \right )}}{b \sqrt {- \frac {a}{b}}} - 2 p x + x \log {\left (c \left (a + b x^{2}\right )^{p} \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(ln(c*(b*x**2+a)**p),x)

[Out]

Piecewise((x*log(0**p*c), Eq(a, 0) & Eq(b, 0)), (x*log(a**p*c), Eq(b, 0)), (-2*p*x + x*log(c*(b*x**2)**p), Eq(
a, 0)), (2*a*p*log(x - sqrt(-a/b))/(b*sqrt(-a/b)) - a*log(c*(a + b*x**2)**p)/(b*sqrt(-a/b)) - 2*p*x + x*log(c*
(a + b*x**2)**p), True))

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.00 \[ \int \log \left (c \left (a+b x^2\right )^p\right ) \, dx=2 \, b p {\left (\frac {a \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} b} - \frac {x}{b}\right )} + x \log \left ({\left (b x^{2} + a\right )}^{p} c\right ) \]

[In]

integrate(log(c*(b*x^2+a)^p),x, algorithm="maxima")

[Out]

2*b*p*(a*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b) - x/b) + x*log((b*x^2 + a)^p*c)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.91 \[ \int \log \left (c \left (a+b x^2\right )^p\right ) \, dx=p x \log \left (b x^{2} + a\right ) + \frac {2 \, a p \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}} - {\left (2 \, p - \log \left (c\right )\right )} x \]

[In]

integrate(log(c*(b*x^2+a)^p),x, algorithm="giac")

[Out]

p*x*log(b*x^2 + a) + 2*a*p*arctan(b*x/sqrt(a*b))/sqrt(a*b) - (2*p - log(c))*x

Mupad [B] (verification not implemented)

Time = 1.23 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.82 \[ \int \log \left (c \left (a+b x^2\right )^p\right ) \, dx=x\,\ln \left (c\,{\left (b\,x^2+a\right )}^p\right )-2\,p\,x+\frac {2\,\sqrt {a}\,p\,\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )}{\sqrt {b}} \]

[In]

int(log(c*(a + b*x^2)^p),x)

[Out]

x*log(c*(a + b*x^2)^p) - 2*p*x + (2*a^(1/2)*p*atan((b^(1/2)*x)/a^(1/2)))/b^(1/2)